# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [2.0.0] - TBD (future release)
### Removed
These are not completely removed yet, but will be in version 2.0.0.
* `tb2` CONFIG support. Affected `user.js`es can only be updated by using `-c`.
* `-s` option. Switch to `-u`.
* Git branches different from `main`. Versions prior to 1.3.0 can only be updated manually.


## [Unreleased]
### Added
### Changed
### Deprecated
### Removed
### Fixed
### Security


## [1.6.2] – 2024-03-17
### Fixed
* Removed an unnecessary `eval` command


## [1.6.1] – 2022-11-18
### Fixed
* `firefox/profiles.ini` getting basically parsed twice if thunderbird was not installed.


## [1.6.0] – 2022-11-17
### Added
* `-g` option: You can now specify a path to a user overrides file or directory which will be applied to every Firefox profile. If it's a directory every file in it that ends on `.js` will be applied. If you use the default path `~/.mozilla/firefox/global-user-overrides.js` you don't even need to use this option explicitly.
* `empty` config: You may now specify `-c empty` on a profile which creates a basically empty `user.js`. User overrides are still appended so you can solely apply your (global) user overrides to a profile – without a `user.js` template from anywhere.
* `-c` option: `arkenfox` (Firefox) and `HorlogeSkynet` (Thunderbird) are now available

### Fixed
* `-r` failing because some other, in that case not even needed function failed early
* `-i` opening an empty file because the script exited and deleted the `user.js` faster than the system open command opened it


## [1.5.2] – 2022-09-12
### Added
* `medium` config. It's called medium streng in Privacy-Handbuch, `streng` corresponds to sehr streng.


## [1.5.1] – 2022-04-07
### Fixed
* Thunderbird detected as default browser if executable in current working directory
* Keep file permissions of `user.js` and the updater itself during updates


## [1.5.0] - 2022-04-06
### Added
* Check every new user.js against the profile, including a warning if it doesn't seem right
* Try to detect Firefox update channel from `compatibility.ini` for a first Firefox `user.js` in a profile if `-e` is not used
* `user.js` installation may be confirmed with j/J
* `-t` option: Dry-run – Do a trial run without actual changes but mostly the same output
* `-q` option: Quieter – Print less output for every given q (up to 4 for complete silence)

### Changed
* When no profile path given, current working directory is assumed. If no typical file is found, the updater directory is assumed (as backward compatible fallback).
* Precedence to find Firefox update channel: `-e` > previous `user.js` > `compatibility.ini` > `firefox --version`
* Errors and Warnings are now printed to `stderr`
* Wording and output order changes
* A `user.js` only gets installed if it is different (overrides are taken into account)
* Fail earlier on invalid profile path selection
* `user.js` update now is also confirmed by just hitting return
* Running order: Inspect (`-i`) will open the new `user.js` before you are asked for confirmation. Also you won't even be bothered with the confirmation dialogue if `user.js`es are identical.

### Removed
* Guessing of global Firefox update channel *release* if none found

### Fixed
* `tb-streng` `user.js` could not be parsed
* Possible infinite recursion into directories named `user-overrides.js`


## [1.4.3] - 2022-03-21
### Fixed
* `user.js` version extraction failed due to new layout by Privacy-Handbuch


## [1.4.2] - 2022-02-19
### Added
* `tb-streng` config
* Vim modeline


## [1.4.1] - 2021-11-09
### Fixed
* `-b` and `-d` options doing the opposite of what is stated in the usage text


## [1.4.0] - 2021-11-09
### Added
* `-a` option: update all Thunderbird and Firefox profiles (in standard locations) with already existing `user.js`es.
* `-e` option now supports `0` to force *release* variant of `user.js`
* `-v` option: display version

### Changed
* Massive refactoring: coding structure, style, efficiency improvents
* Firefox update channel detection for `user.js` download; precedence now is: `-e` option > read from `user.js` > `firefox --version` > *release* (fallback)
* Changelog is not displayed on updates anymore, just a link where to find it

### Deprecated
* `tb2` CONFIG support
* `-s`: Switch to `-u`! Update options are used consciously. Asking for another confirmation is thus pointless. Both options are synonymous now (silent), but `-s` will be removed eventually.

### Fixed
* Some non-POSIX command options
* macOS compatibility
* Script unusable when Firefox executable not in `PATH` variable


## [1.3.1] - 2021-10-10
### Fixed
* Write readonly var in a run with multiple profiles


## [1.3.0] - 2021-10-07
### Added
* Error messages on failed downloads

### Changed
* `-l` output for more clarity
* Lots of code and readability improvements

### Deprecated
* Every git branch except `main`

### Fixed
* macOS funcionality (presumably)
* Possible bug with multiline `-c` arguments
* Some non-POSIX lines
* Some wrong exit codes


## [1.2.2] - 2021-04-19
### Fixed
* `firefox --version` check with firejail


## [1.2.1] - 2021-02-23
### Fixed
* A bug when changing from *ESR* to *release* version
* `firefox --version` fails because Firefox is not installed (thunderbird only usage)


## [1.2.0] - 2021-02-23
### Added
* Support for different `user.js`es; an *ESR* and a *release* one

### Changed
* `-v` option is renamed to `-i` ("inspect")
* Failed downloads will now be reported
* Updater is now much less verbose by default
* Names of diff and backup files


## [1.1.4] - 2020-11-29
### Changed
* Minor wording


## [1.1.3] - 2020-11-28
### Fixed
* Thunderbird `user.js` URL


## [1.1.2] - 2020-08-23
### Fixed
* Grouping of conditions with parentheses (which is an unwanted subshell)


## [1.1.1] - 2020-08-20
### Fixed
* Variables being read-only when they actually might change


## [1.1.0] - 2020-08-20
### Added
* Multiple profiles can be handled in one run (all `-p` paths plus the one selected with `-l`)

### Changed
* After an update of the updater, output the relevant part of the changelog
* Don't execute freshly downloaded updater after an update

### Fixed
* Usage of `-l` and `-p` in conjunction


## [1.0.1] - 2020-04-26
### Fixed
* Prevent colored output when `stdout` is not a terminal


## [1.0.0] - 2020-04-22
* Release
